﻿using System;
using System.Collections.Generic;
using System.Web;

namespace Touch
{
    public partial class _AppDetails : System.Web.UI.Page
    {
        LocalFunctions FUNC;
        protected Application app;
        List<Picture> lstPictures;
        private int iAppID;
        List<Application> lstSlimilar;
        public String sIphoneStyleHideBanner = String.Empty;

        protected void Page_Load(object sender, EventArgs e)
        {
            FUNC = new LocalFunctions();
            GetParameters();
            app = FUNC.GetAppByID(iAppID);


            // get Pictures
            lstPictures = FUNC.GetPicturesByAppID(iAppID);
            rptPictures.DataSource = lstPictures;
            rptPictures.DataBind();

            // Get Similar applications
            lstSlimilar = FUNC.GetSimilarApplications(iAppID);
            rptSimilarApps.DataSource = lstSlimilar;
            rptSimilarApps.DataBind();
        }

        private void GetParameters()
        {
            iAppID = Convert.ToInt32(Request.QueryString["aid"]);
        }
    }
}